1. Field of the Invention
The present invention relates to a coding and decoding of shape information for motional images, and more particularly, to an apparatus and method for scalably coding/decoding shapes by utilizing a scan interleaving method in which a scanning order of vertical and horizontal scannings is applied differently from each other in scalably coding/decoding the shapes.
2. Discussion of Related Art
In encoding scalably shape information it is an art that a plurality of layers having each different resolution are coded and transmitted and decoded. Such art has been required in various art fields. In coding a plurality of layers having each different resolution there are types of a spatial scalability and a temporal scalability.
FIG. 1 shows a conceptual diagram providing the spatial scalable coding method. A base layer has a lower spatial resolution and an enhancement layer has a high spatial resolution. A general coding method is used on the base layer. On an enlargement layer, meanwhile, images on the base layer are up-sampled, that is, the images on the base layer become a screen having a high resolution through an interpolation, and images of size equal to images on the enhancement layer are provided thereon. Thus a coding having a high efficiency can be realized by predicting not only the images from the enhancement layer but also the interpolated images from the enlargement layer. White arrow marks shown in FIG. 1 indicate a direction of a prediction.
A compression efficiency is high in case that an image of an object is separated from its background then is coded. In order to code only an object separately like this, it needs to encode shape information for separating an object from a background on an image, separately from information of luminance and color signals in each of pixels constituting the object. The shape information is a binary image indicating the interior and the exterior of the object. That is, the interior of object may be as xe2x80x9c1xe2x80x9d and the exterior of object may be as xe2x80x9c0xe2x80x9d.
In the scalable coding process, not only color information but also shape information is available to be encoded. In coding to an image of an enhancement layer through a use of an image on a base layer, there are cases of using an intra image and a predicted image. In the shape information scalable coding method, in case of using intra shape information of a base layer, a scan interleaving method is employed representatively.
FIG. 2 is a basic conceptual diagram of the scan interleaving for coding from a base layer to an enhancement layer. Rows of the first, third and fifth are reference scan lines and their values are known to a coder and a decoder. Their values may be pixel values of the base layer. The second and fourth rows are cord scan lines to be coded by the coder. In order to code a pixel value of a cord scan line, pixel values of two upper and lower reference scan lines are scanned. The correlation between the reference scan lines and the cord scan lines is as follows.
There is a case that pixel values of two scan lines and a pixel value of a cord scan line are same. In such a case, shape information has a value of xe2x80x9c0xe2x80x9d on the background and a value of xe2x80x9c1xe2x80x9d on the object, or has its opposite value. Most pixels to be coded are included into such a case. There is a case that pixel values on two reference scan lines are different from each other and this case is as a transitional sample, in which the pixel values should be coded. A position which the transitional sample is generated can be noted through the reference scan lines, thus the position information does not need to be transmitted. There is also a case that pixel values on two reference scan lines are same as each other meantime are different from a pixel value on a cord scan line. Such a case is as an exceptional sample, in which position information of the pixel that the exceptional sample is generated should be transmitted, meantime a pixel value does not need to be transmitted since it has a value opposite against pixel values of reference lines.
Accordingly, in employing a scan interleaving method in order for coding a base layer to an enhancement layer, two kinds of data, a transitional sample data (hereinafter, referred to as xe2x80x9cTSDxe2x80x9d) and an exceptional sample data (ESD) should be coded.
Referring to FIGS. 3(a) and 3(b), it shows a resolution of a base layer and an enhancement layer respectively. The enhancement layer has twice higher resolution all in the width and length directions than the base layer. If the base layer has a resolution of Mxc3x97N, the enhancement layer has a resolution of (2xc3x97M)xc3x97(2xc3x97N). A pixel position of the base layer is constructed so that it may have a position value of the right lower of each of 2xc3x972 blocks on the enhancement layer. Parts with one set of lines in FIG. 3(b) become each position of pixels which constitute the base layer. In order to encode the enhancement layer by using the base layer, white blocks in FIG. 3(b) should be coded. At this time, parts with one set of lines are same as the value on the base layer, thus there is no need to code the parts with one set of lines again. The parts with one set of lines are utilized when the enhancement layer is coded.
There needs two steps to encode the enhancement layer. FIGS. 4(a) to 4(d) represent vertical and horizontal scannings to code the enhancement layer.
As shown in FIG. 4(a), first, left and right pixel values of the base layer as pixels with one set of lines are used as reference values in coding parts with two sets of lines of the enhancement layer. As shown in FIG. 4(b), next, upper and lower pixel values of pixels shown as parts with one set of lines and encoded with the base layer at the first step are utilized as reference values to encode parts with two sets of lines on the enhancement layer.
In another method, as shown in FIG. 4(c), upper and lower pixel values of the base layer shown as parts with one set of lines are used as reference values in order to encode parts with two sets of lines of the enhancement layer. Then, as shown in FIG. 4(d), left and right pixel values of pixels shown as parts with one set of lines and coded with the base layer at the first step are utilized as reference values in order to encode parts with two sets of lines of the enhancement layer.
In two steps for coding an enhancement layer, the method for using left and right pixel values as a reference value is a horizontal scanning, and the method for using upper and lower pixel values as a reference value is a vertical scanning.
The scan interleaving method has two scanning steps as afore-mentioned. In its scanning order there may be also two methods that the vertical scanning is first progressed and the horizontal scanning is next progressed, and the horizontal scanning is first progressed then the vertical scanning is next progressed. At present, one of such two scanning methods in the scan interleaving method is selected and used.
In using the scan interleaving method, two kinds of data, TSD and ESD, should be coded. A main cause for deciding coding information quantity in the scan interleaving method is influenced by generation quantity of the TSD and ESD. That is to say, the smaller the TSD and ESD are generated, the smaller the coding information quantity becomes. By the way, the generation quantity of the TSD and ESD in coding may become different according to a shape of shape information by an order of the vertical and horizontal scannings. To code the enhancement layer, as shown in FIG. 4(a) to 4(d), the scanning should be progressed two times as the vertical and horizontal scannings. In such scannings, the number of coding pixels in the second scanning is more twice than the first scanning regardless an order of the vertical and horizontal scannings. Its reason is that pixels of the enhancement layer are coded in the first scanning referring to pixels of the base layer which are positioned skipping over each one block as shown in FIGS. 4(a) and 4(c), and pixels already noted about their values through the first scanning are coded in succession in the second scanning. As shown as parts with two sets of lines in FIGS. 4(a) to 4(d), 16 pixels in FIGS. 4(a) and 4(c) indicating the first scanning should be scanned, and 32 pixels in FIGS. 4(b) and 4(d) indicating the second scanning should be scanned.
FIGS. 5(a) to 5(d) provides a generation state of TSD and ESD based on an order of a scanning direction for shape information having many vertical boundary lines. FIGS. 5(a) and 5(b) show a method that the horizontal scanning is first executed and the vertical scanning is next performed. FIGS. 5(c) and 5(d) show a method the vertical scanning is first executed and the horizontal scanning is next performed. In case that the horizontal scanning is first performed and the vertical scanning is executed next, 4 TSD""s are generated in FIG. 5(a) as the first scanning process. In FIG. 5(b) as the second scanning process, 1 TSD is generated. Thus the total 5 TSD""s are generated. In FIG. 5(b), a successive display of pixels is available through known pixel values on reference scan lines since pixels positioned between pixels constituting the base layer are scanned through the horizontal scanning. On the contrary, in case that the vertical scanning is first performed and the horizontal scanning is executed next, 1 TSD is generated in the first scanning and 8 TSD""s are generated in the second scanning. Thus the total 5 TSD""s are generated. Thus the total 9 TSD""s are generated.
Accordingly, in case that a boundary line on shape information is a vertical direction, the generation quantity of TSD may be less in a scanning order which the horizontal scanning first and the vertical scanning next are executed. In case that its boundary line is a horizontal direction, a scanning order which the vertical scanning first and the horizontal scanning next are executed, may make the generation quantity of the TSD less.
Like this, the TSD and ESD may be generated in its quantity more than an opposite scanning order since the generation quantity of the TSD and ESD can become different according to such scanning order, if the scanning order is constantly fixed. That is, a coding efficiency falls since the bit quantity in such a case becomes more than the opposite scanning order.
Accordingly, the present invention is directed to an apparatus and method for scalably coding/decoding shapes through a way of a scan interleaving that substantially obviate one or more of the problems due to limitations and disadvantages of the related art.
An object of the present invention is to provide an apparatus and method for coding/decoding scalably shapes, which are capable of improving a coding and decoding efficiency, by applying a scanning order of vertical and horizontal scannings differently from each other to an image coding through a way of a scan interleaving, in coding images from a base layer and to an enhancement layer.
Another object of the present invention is to provide an apparatus and method for coding/decoding scalably shapes by utilizing a scan interleaving way in which a scanning order based on a boundary line direction of a base layer can be decided so that coding bits may be generated in the small quantity.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
To achieve these and other advantages and in accordance with the purpose of the present invention, as embodied and broadly described, a scanning order of horizontal and vertical scannings is differently applied to an image coding from a base layer to an enhancement layer through a use of a scan interleaving way. The scanning order is decided by a direction of a boundary line, the number of TSDs, the number of ESDs, the sum of the TSD and ESD, the number of bits when the TSD was coded, the number of bits when the ESD was coded, the number of bits when the TSD and ESD were coded, and the total number of coding bits. Additional information having such decided scanning order and coding information are transmitted to a decoder. The decoder receives this additional information and decodes it in the scanning order. The additional information indicating the scanning order is coded by using a fixed length coding, a variable length coding, a fixed arithmetic coding and a variable arithmetic coding method.
The additional information representing a scanning order, which is transmitted to each block, has much importance in the total. There is thus presented a method using a characteristic of a boundary line of a base layer as a method that the additional information for a scanning order is not transmitted. A coder and decoder can decide the same scanning order in a case of using only the base layer since the coder and decoder have the same base layer. That is, there is no need to transmit the additional information of the scanning order.
In another method for applying a scanning order differently, the coding and decoding can be done by fixing the scanning order and moving symmetrically coded blocks or rotating the coded blocks 90 degrees centering on a diagonal line. That is to say, in case that the scanning order requires a preferential execution of a horizontal scanning or a preferential execution of a vertical scanning, the coding and decoding is realized by symmetrically moving coding blocks in a direction of a diagonal line or rotating the coding blocks 90 degrees under a state that the scanning order is fixed.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are intended to provide further explanation of the invention as claimed.